﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Adminitrator.master" AutoEventWireup="true" CodeFile="ListLabel.aspx.cs" Inherits="admin_ConfigProduct_ListLabel" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
      <ContentTemplate>   
  <h1 class="title">
    Danh sách Label</h1>
  <div class="search">
    
  </div><!-- End #search -->
  
     <div id="gridview">
    <asp:GridView ID="gridView" CssClass="tstyle1" runat="server"  AutoGenerateColumns="False"
      CellPadding="3" EnableModelValidation="True" GridLines="None" AllowPaging="True"
      BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" 
         CellSpacing="1" PageSize="8"
      OnPageIndexChanging="gridView_PageIndexChanging"      
      OnRowDeleting="gridView_RowDeleting" EmptyDataText="Dữ liệu trống !" 
       >
     
      <SelectedRowStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Font-Underline="True" />
        <Columns>
        <asp:TemplateField HeaderText="STT">
          <ItemTemplate>
            <%# Container.DataItemIndex + 1 %>
          </ItemTemplate>
          <ItemStyle Width="40px" />
        </asp:TemplateField>
          <asp:TemplateField HeaderText="Chọn">
            <ItemTemplate>
              <asp:CheckBox ID="checkBox" runat="server" />
            </ItemTemplate>
            <ItemStyle Width="45px" />
          </asp:TemplateField>
          <asp:BoundField DataField="Id" HeaderText="ID">
          <ItemStyle Width="35px" />
          </asp:BoundField>
          <asp:BoundField DataField="Name" HeaderText="Tên Label">
          <ItemStyle Width="200px" />
          </asp:BoundField>        
          <asp:HyperLinkField DataNavigateUrlFields="Id" 
            DataNavigateUrlFormatString="~/admin/ConfigProduct/LabelDetail.aspx?Id={0}" 
            HeaderText="Sửa" >
          <ItemStyle CssClass="btnEdit" Width="30px" />
          </asp:HyperLinkField>
          <asp:TemplateField HeaderText="Xóa">
            <ItemTemplate>
              <asp:LinkButton ID="linkDelete" runat="server" CausesValidation="false" Text="" CssClass="btnDelete"
              CommandName="Delete" OnClientClick="return confirm('Bạn có chắc chắn muốn xóa ?')">
              </asp:LinkButton>
            </ItemTemplate>
            <ItemStyle Width="30px" />
          </asp:TemplateField>
        </Columns>
      </asp:GridView>
         <asp:UpdateProgress ID="UpdateProgress1" runat="server">
          <ProgressTemplate>
              <img src="../../Images/ajax-loader.gif" alt="Loadding" style="position: absolute; top: 50%; left: 50%; z-index: 1000" />
          </ProgressTemplate>
        </asp:UpdateProgress>
    </div>
   <!-- End #gridView -->
  <div>
    <table style="width: 100%">
      <tr>
        <td align="left" valign="top">
          <asp:LinkButton ID="LinkButton1" runat="server" Text="" CssClass="button btn-check"
            OnClick="linkCheckAll_Click" />&nbsp; &nbsp; &nbsp;
          <asp:LinkButton ID="LinkButton2" runat="server" Text="" CssClass="button btn-uncheck"
            OnClick="linkUnCheckAll_Click" />
        </td>
        <td align="right">
          <asp:Button runat="server" ID="btnAdd" Text="" CssClass="button btn-add" OnClick="btnAdd_Click" />&nbsp;
          <asp:Button runat="server" ID="btnXoaChon" Text="" CssClass="button btn-delete" OnClientClick="return confirm('Bạn có chắc chắn muốn xóa ?')"
            OnClick="btnXoaChon_Click" />
          &nbsp;
        </td>
      </tr>
    </table>
  </div>
  <div style="margin: 10px 0px">
    <label>
      Số dòng hiển thị trên 1 trang :
    </label>
    <asp:DropDownList runat="server" ID="dropPageSize" CssClass="dropdown" AutoPostBack="true"
      OnSelectedIndexChanged="dropCountRow_SelectedIndexChanged">
      <asp:ListItem Text=" 10 " Value="10" />
      <asp:ListItem Text=" 20 " Value="20" Selected="True" />
      <asp:ListItem Text=" 30 " Value="30" />
      <asp:ListItem Text=" 50 " Value="50" />
      <asp:ListItem Text=" 100 " Value="100" />
    </asp:DropDownList>
  </div>
  <div style="margin-top: 10px">
    <asp:Literal ID="lbThongBao" runat="server" />
  </div>
         </ContentTemplate> 
    </asp:UpdatePanel>
</asp:Content>

